package com.yuandian.api.management.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.yuandian.api.management.validate.SelectFlag;
import com.yuandian.api.management.validate.UpdateFlag;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * 节点属性配置表-实体
 * @author zfsn
 * @date 2023-5-8
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "节点属性配置表", description = "")
@TableName("conf_node_property")
public class ConfNodeProperty extends Model<ConfNodeProperty> {

	/**
	 * 1：IT路径图、2：步骤端到端配置图
	 */
	@NotNull(message = "关系图类型不能为空", groups = {SelectFlag.class})
	@ApiModelProperty(value = "关系图类型", notes = "1：IT路径图、2：步骤端到端配置图")
	private Integer type;

	/**
	 * 用来区分同一种类型的不同关系图。例如在IT路径图中，每个系统都对应一个图，那么这个关系图id就可以是系统id。例如在步骤端到端配置图中，每个步骤对应一个图，那么这个关系图id就可以是步骤编码。
	 */
	@NotNull(message = "关系图id不能为空", groups = {SelectFlag.class})
	@ApiModelProperty(value = "关系图id", notes = "用来区分同一种类型的不同关系图。例如在IT路径图中，每个系统都对应一个图，那么这个关系图id就可以是系统id。例如在步骤端到端配置图中，每个步骤对应一个图，那么这个关系图id就可以是步骤编码。")
	private String graphId;

	/**
	 *
	 */
	@NotNull(message = "节点id不能为空", groups = UpdateFlag.class)
	@ApiModelProperty(value = "节点id", notes = "")
	private String nodeId;

	/**
	 *
	 */
	@NotNull(message = "x轴坐标不能为空", groups = UpdateFlag.class)
	@ApiModelProperty(value = "坐标x", notes = "")
	private Double locationX;

	/**
	 *
	 */
	@NotNull(message = "y轴坐标不能为空", groups = UpdateFlag.class)
	@ApiModelProperty(value = "坐标y", notes = "")
	private Double locationY;

	/**
	 *
	 */
	@ApiModelProperty(value = "当前节点的路径", notes = "")
	private String path;

	/**
	 *
	 */
	@ApiModelProperty(value = "当前节点携带参数", notes = "")
	private String meta;

	/**
	 *
	 */
	@JsonIgnore
	@ApiModelProperty(value = "创建人", notes = "")
	private String createBy;

	/**
	 *
	 */
	@JsonIgnore
	@ApiModelProperty(value = "创建时间", notes = "")
	private LocalDateTime createTime;

	/**
	 *
	 */
	@JsonIgnore
	@ApiModelProperty(value = "更新人", notes = "")
	private String updateBy;

	/**
	 *
	 */
	@JsonIgnore
	@ApiModelProperty(value = "更新时间", notes = "")
	private LocalDateTime updateTime;

	/**
	 * 0：否、1：是
	 */
	@JsonIgnore
	@ApiModelProperty(value = "是否逻辑删除", notes = "0：否、1：是")
	private Integer isDel;

	/**
	 *
	 */
	@ApiModelProperty(value = "备注", notes = "")
	private String remarks;

	@TableField(exist = false)
	@ApiModelProperty(value = "系统id", notes = "")
	private Integer systemId;


	@TableField(exist = false)
	@ApiModelProperty(value = "网端id", notes = "")
	private Integer segmentId;

}